package com.example.demo.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.entity.TestEntity;
import com.example.demo.vo.TestVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TestDao extends BaseMapper<TestEntity> {

    @Select("SELECT * FROM test ")
    List<TestEntity> getAll();


    TestEntity test(@Param("id") int id);

    @Select("select * from test where id = #{condition.id}")
    IPage<TestEntity> selectByPage(Page<TestEntity> page, @Param("condition") TestVo condition);


}
